raar.behaviour
Class RALogExpression

java.lang.Object
  extended byraar.behaviour.RALogExpression
All Implemented Interfaces:
RALogObject, java.io.Serializable

public class RALogExpression
extends java.lang.Object
implements RALogObject

See Also:
Serialized Form

Field Summary
static int AND
           
static int NOT
           
static int OR
           
 
Constructor Summary
RALogExpression(RALogObject p, RALogObject q, int operation)
           
 
Method Summary
 boolean bValue()
           
 boolean evaluate()
          Returns an evaluation of this expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AND

public static final int AND
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

NOT

public static final int NOT
See Also:
Constant Field Values
Constructor Detail

RALogExpression

public RALogExpression(RALogObject p,
                       RALogObject q,
                       int operation)
Method Detail

evaluate

public boolean evaluate()
                 throws RAException
Returns an evaluation of this expression. If p is null, it is always false. If q is null, it is always false, except when the operation is NOT and p is not null. Then it simply evaluates (NOT p).

Throws:
RAException

bValue

public boolean bValue()
               throws RAException
Specified by:
bValue in interface RALogObject
Throws:
RAException